﻿<Window x:Name="shellView" x:Class="Probel.Ldoc.Shell.ShellView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:t="clr-namespace:Probel.Ldoc.Shell.Properties"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:s="clr-namespace:Probel.Ldoc.Shell.Tools"
        
        Title="{x:Static t:Messages.Title_Shell}"

        Icon="/Probel.Ldoc.Shell;component/Icon.ico"
        WindowState="Maximized"
        
        Loaded="Window_Loaded"
        Closing="Window_Closing"
        KeyUp="ShellView_KeyUp">
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="BoolToVisibility"/>
    </Window.Resources>
    <Window.Background>
        <ImageBrush ImageSource="/Probel.lDoc.Shell;component/Images/background.PNG"
      Viewport="0,0,24,24"
      Stretch="None"
                ViewportUnits="Absolute"
      TileMode="Tile"/>
    </Window.Background>
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Open"
                    Executed="CommandOpen_Executed"
                    CanExecute="CommandOpen_CanExecute"/>
    </Window.CommandBindings>
    <DockPanel>
        <StatusBar x:Name="statusBar" DockPanel.Dock="Bottom"
               Background="#FF465A7D">

            <StatusBarItem HorizontalAlignment="Right">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{x:Static t:Messages.Status_UpdateProgress}" Foreground="White"/>
                    <ProgressBar x:Name="updateProgress" Value="50" Width="160"
                       Margin="5"/>
                </StackPanel>
            </StatusBarItem>
        </StatusBar>
        <Ribbon x:Name="ribbon"
            DockPanel.Dock="Top">
            <Ribbon.QuickAccessToolBar>
                <RibbonQuickAccessToolBar Visibility="Collapsed"/>
            </Ribbon.QuickAccessToolBar>
            <Ribbon.ApplicationMenu>
                <RibbonApplicationMenu Visibility="Collapsed"/>
            </Ribbon.ApplicationMenu>
            <RibbonTab Header="{x:Static t:Messages.RibbonTab_Home}">
                <RibbonGroup Header="{x:Static t:Messages.RibbonGroup_Tools}">
                    <RibbonButton Label="{x:Static t:Messages.Btn_Search}"
                                  LargeImageSource="/Probel.Ldoc.Shell;component/Images/Search.png"
                                  SmallImageSource="/Probel.Ldoc.Shell;component/Images/Search.png"
                                  Click="Click_Search"/>
                    <RibbonButton Label="{x:Static t:Messages.Btn_CreatePatient}" 
                                   LargeImageSource="/Probel.Ldoc.Shell;component/Images/PatientMale.png"
                                   SmallImageSource="/Probel.Ldoc.Shell;component/Images/PatientMale.png"
                                   Click="Click_NewPatient">
                    </RibbonButton>
                </RibbonGroup>
                <RibbonGroup Header="{x:Static t:Messages.RibbonGroup_Navigation}"
                             x:Name="groupNavigation">
                    <RibbonButton Label="{x:Static t:Messages.Btn_MedicalCard}"
                                  LargeImageSource="/Probel.Ldoc.Shell;component/Images/PatientFile.png"
                                  SmallImageSource="/Probel.Ldoc.Shell;component/Images/PatientFile.png"
                                  Click="Click_RecordEditor"/>
                    <RibbonButton Label="{x:Static t:Messages.Btn_EditPatient}"
                                  LargeImageSource="/Probel.Ldoc.Shell;component/Images/PatientData.png"
                                  SmallImageSource="/Probel.Ldoc.Shell;component/Images/PatientData.png"
                                  Click="Click_EditPatient"/>
                </RibbonGroup>
            </RibbonTab>
            <RibbonTab Header="{x:Static t:Messages.RibbonGroup_Tools}">
                <RibbonGroup>
                    <RibbonButton Label="{x:Static t:Messages.Btn_SearchIncoherences}"
                                  Click="Click_FindIncoherences"
                                  SmallImageSource="/Probel.Ldoc.Shell;component/Images/Analyse_Ribbon.png" 
                                  LargeImageSource="/Probel.Ldoc.Shell;component/Images/Analyse_Ribbon.png"/>
                    <RibbonButton Label="{x:Static t:Messages.Btn_ExtractPictures}"
                                  Click="Click_ExtractPictures"
                                  SmallImageSource="/Probel.Ldoc.Shell;component/Images/PictureAndText.png" 
                                  LargeImageSource="/Probel.Ldoc.Shell;component/Images/PictureAndText.png"/>
                </RibbonGroup>
            </RibbonTab>
            <RibbonTab Header="{x:Static t:Messages.Menu_Help}">
                <RibbonGroup Header="{x:Static t:Messages.Menu_Settings}">
                    <RibbonButton Label="{x:Static t:Messages.Menu_Settings}"
                                  LargeImageSource="/Probel.Ldoc.Shell;component/Images/Settings_Big.png"
                                  SmallImageSource="/Probel.Ldoc.Shell;component/Images/Settings_Big.png"
                                  Click="Click_Settings"/>
                    <RibbonButton Label="{x:Static t:Messages.Menu_About}"
                                  LargeImageSource="/Probel.Ldoc.Shell;component/Images/About.png"
                                  SmallImageSource="/Probel.Ldoc.Shell;component/Images/About.png"
                                  Click="Click_About"/>
                </RibbonGroup>
            </RibbonTab>
        </Ribbon>
        <DockPanel x:Name="toolboxTray"
               DockPanel.Dock="Top">
            <DockPanel.Resources>
                <Style TargetType="Button">
                    <Setter Property="Background" Value="{x:Null}"/>
                    <Setter Property="BorderBrush" Value="{x:Null}"/>
                </Style>
                <Style TargetType="Image">
                    <Setter Property="Width" Value="25"/>
                    <Setter Property="Width" Value="25"/>
                </Style>
            </DockPanel.Resources>
            <Menu DockPanel.Dock="Top" Background="{StaticResource MenuBackgroundBrush}">
                <MenuItem Header="{x:Static t:Messages.Menu_File}">
                    <MenuItem Header="{x:Static t:Messages.Btn_Search}"
                    Click="Click_Search">
                        <MenuItem.Icon>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/Search.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="{x:Static t:Messages.Btn_CreatePatient}"
                              Click="Click_NewPatient">
                        <MenuItem.Icon>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/PatientMale.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                    <Separator/>
                    <MenuItem Header="Close"
                    Click="Click_Close">
                        <MenuItem.Icon>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/Close.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>
                <MenuItem Header="{x:Static t:Messages.Menu_Tools}">
                    <MenuItem Header="{x:Static t:Messages.Btn_SearchIncoherences}"
                              Click="Click_FindIncoherences">
                        <MenuItem.Icon>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/Analysis.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="{x:Static t:Messages.Btn_ExtractPictures}"    
                              Click="Click_ExtractPictures">
                        <MenuItem.Icon>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/PictureAndText.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>
                <MenuItem x:Name="viewMenu" Header="{x:Static t:Messages.Menu_View}">
                    <MenuItem Header="{x:Static t:Messages.Btn_MedicalCard}"
                              Click="Click_RecordEditor">
                        <MenuItem.Icon>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/PatientFile.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="{x:Static t:Messages.Btn_EditPatient}"
                              Click="Click_EditPatient">
                        <MenuItem.Icon>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/PatientData.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>
                <MenuItem Header="{x:Static t:Messages.Menu_Help}">
                    <MenuItem Header="{x:Static t:Messages.Menu_Settings}"
                              Click="Click_Settings">
                        <MenuItem.Icon>
                            <Image Source="/Probel.Ldoc.Shell;component/Images/Settings.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="{x:Static t:Messages.Menu_About}"
                              Click="Click_About">
                        <MenuItem.Icon>
                            <Image Source="/Probel.Ldoc.Shell;component/Images/Info.png"/>
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>
            </Menu>
            <Border DockPanel.Dock="Top"
                   Background="{StaticResource ToolBarTrayBackground}">
                <ToolBar x:Name="mainToolbar"
                         ToolBarTray.IsLocked="True"
                         Background="{StaticResource ToolBarTrayBackground}">
                    <Button Click="Click_Search"
                            ToolTip="{x:Static t:Messages.Btn_Search}">
                        <DockPanel>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/Search.png"/>
                            <TextBlock Text="{x:Static t:Messages.Btn_Search}"
                         Visibility="{s:ShellSettings IsMenuTextVisible}"
                         VerticalAlignment="Center"/>
                        </DockPanel>
                    </Button>
                    <Button Click="Click_NewPatient"
                            ToolTip="{x:Static t:Messages.Btn_CreatePatient}">
                        <DockPanel>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/PatientMale.png"/>
                            <TextBlock Text="{x:Static t:Messages.Btn_CreatePatient}"
                                       Visibility="{s:ShellSettings IsMenuTextVisible}"
                                       VerticalAlignment="Center"/>
                        </DockPanel>
                    </Button>
                    <Separator/>
                    <Button x:Name="btnRecordEditor" Click="Click_RecordEditor"
                            ToolTip="{x:Static t:Messages.Btn_MedicalCard}">
                        <DockPanel>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/PatientFile.png"/>
                            <TextBlock Text="{x:Static t:Messages.Btn_MedicalCard}"
                         Visibility="{s:ShellSettings IsMenuTextVisible}"
                         VerticalAlignment="Center"/>
                        </DockPanel>
                    </Button>
                    <Button x:Name="btnEditPatient" Click="Click_EditPatient"
                            ToolTip="{x:Static t:Messages.Btn_EditPatient}">
                        <DockPanel>
                            <Image DockPanel.Dock="Left" Source="/Probel.Ldoc.Shell;component/Images/PatientData.png"/>
                            <TextBlock Text="{x:Static t:Messages.Btn_EditPatient}"
                                       Visibility="{s:ShellSettings IsMenuTextVisible}"
                                       VerticalAlignment="Center"/>
                        </DockPanel>
                    </Button>
                </ToolBar>
            </Border>
        </DockPanel>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="300" x:Name="sideColumn"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Frame x:Name="sideFrame" Grid.Column="0"
             NavigationUIVisibility="Hidden"/>
            <GridSplitter Grid.Column="0"
                    HorizontalAlignment="Right"
                    Width="4"
                    Background="#FF334767"/>
            <Frame x:Name="mainFrame" Grid.Column="2"
             NavigationUIVisibility="Hidden"/>
        </Grid>
    </DockPanel>
</Window>
